#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<cstdio>

using namespace std;

int main()
{
    int x, max = 0, position;
    for (int i = 1; i <= 100; i++)
    {
        cin >> x;
        if (x > max)
        {
            max = x;
            position = i;
        }
    }
    cout << max << endl;
    cout << position << endl;
    return 0;
}
